<?php

/**
 * Created by PhpStorm.
 * User: chenzhitao
 * Date: 2018/1/23
 * Time: 下午7:54
 */
namespace App\Http\Result;
class Result
{
    /**
     * @var array
     */
    protected $data = [];


    public function __construct($data = [])
    {
        $this->data = $data;
    }

    public function setData($data)
    {
        return $this->data = $data;
    }

    public function getData()
    {
        return $this->data;
    }

    public function toArray()
    {
        return ['data' => $this->data];
    }
}